package cn.lqz.bucttrain.enums;

/**
 * 订单支付状态
 */
public enum OrderStatusEnum {
    NONPAY(0,"未支付"),
    PAID(1,"已支付"),
    CANCELED(2,"已取消");
    private Integer status;
    private String description;
    OrderStatusEnum(Integer status, String description){
        this.status = status;
        this.description = description;
    }
    public static OrderStatusEnum getByStatus(Integer status){
        for (OrderStatusEnum orderStatus : OrderStatusEnum.values()) {
            if (orderStatus.getStatus().equals(status)){
                return orderStatus;
            }
        }
        return  null;
    }
    public Integer getStatus() {
        return status;
    }
    public String getDescription(){
        return description;
    }
}
